package com.yeqing.jdktest;

public class Demo14 {

    public static void switchTest() {
        int a = 1;

        switch (a) {
            case 1:
                System.out.println("1");
                break;
            case 2:
                System.out.println("2");
                break;
            case 3:
                System.out.println("3");
                break;
            default:
                System.out.println("default");
                break;
        }
    }

//    public static void switchTestUpdate() {
//        int a = 1;
//        switch (a) {
//            case 1 -> System.out.println("1");
//            case 2 -> System.out.println("2");
//            case 3 -> System.out.println("3");
//            default -> System.out.println("default");
//        }
//    }

    public static void main(String[] args) {
        switchTest();
//        switchTestUpdate();
    }
}
